home *** CD-ROM | disk | FTP | other *** search
- #ifndef lint
- static char xsccsid[] = "@(#) inet_addr_fix 1.2 93/07/02 16:33:46";
- #endif
-
- /*
- * Some inet_addr() versions return a struct/union instead of a long. You
- * have this problem when the compiler complains about illegal lvalues or
- * something like that. The following code fixes this mutant behaviour.
- *
- * Bug reported by ben@piglet.cr.usgs.gov (Rev. Ben A. Mesander).
- */
-
- static long fix_inet_addr(string)
- char *string;
- {
- struct in_addr addr = inet_addr(string);
-
- return (addr.s_addr);
- }
-
- #define inet_addr fix_inet_addr
-